// import logo from './logo.svg';
import './App.css';
import MyComponent from "./view/class"

function App() {
  let arr = [
    {name:"张三",age:12},
    {name:"罗丽丝",age:33},
    {name:"阿莎",age:11},
    {name:"王五",age:53},
  ]
  return (
    <div className="App">
      {arr.map((item) => {
        return <div>{item.name}</div>
      })}
      <Comts></Comts>
      <Pages></Pages>
      <MyComponent></MyComponent>
    </div>
  );
}

//定义函数组件
/*
1.组件首字母必须大写
2.组件内部必须由返回值
3.
*/
function Comts() {
  return (
    <div style={{background:'red'}}>定义函数组件</div>
  )
}
const Pages = () => {
  return (
    <div className='Pages'>这是pages组件</div>
  )  
}



export default App;
